﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Class="Oliver.Controls.OnlineStateControl" 
    Width="100" Height="50" mc:Ignorable="d">
    <Grid x:Name="LayoutRoot" Background="{x:Null}">

    	<Grid.RowDefinitions>
    		<RowDefinition Height="0.52*"/>
    		<RowDefinition Height="0.48*"/>
    	</Grid.RowDefinitions>
    	<vsm:VisualStateManager.VisualStateGroups>
    		<vsm:VisualStateGroup x:Name="OnlineStates">
    			<vsm:VisualState x:Name="OnlineState"/>
    			<vsm:VisualState x:Name="OfflineState">
    				<Storyboard>
    					<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
    						<EasingColorKeyFrame KeyTime="00:00:00" Value="#FFDC1B1B"/>
    					</ColorAnimationUsingKeyFrames>
    					<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
    						<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF610000"/>
    					</ColorAnimationUsingKeyFrames>
    				</Storyboard>
    			</vsm:VisualState>
    		</vsm:VisualStateGroup>
    	</vsm:VisualStateManager.VisualStateGroups>
    	<Rectangle x:Name="rectangle" Stroke="#FF727272" RadiusX="9" RadiusY="9" Grid.RowSpan="2">
    		<Rectangle.Fill>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#FF00610A"/>
    				<GradientStop Color="#FF1BDC2E" Offset="1"/>
    			</LinearGradientBrush>
    		</Rectangle.Fill>
    	</Rectangle>
    	<Rectangle Stroke="{x:Null}" RadiusX="7.527" RadiusY="7.527" Margin="4,4,4,-5">
    		<Rectangle.Fill>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#66FFFFFF"/>
    				<GradientStop Color="#19FFFFFF" Offset="1"/>
    			</LinearGradientBrush>
    		</Rectangle.Fill>
    	</Rectangle>
    	<TextBlock x:Name="_stateText" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Grid.RowSpan="2" Foreground="#FFFFFFFF" Text="Online" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontSize="16"/>

    </Grid>
</UserControl>
